package com.cswangdao.mapper;

import com.cswangdao.domain.dto.StoragePageDTO;
import com.cswangdao.domain.po.Storage;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface MarketStorageMapper {

/**
 * @description: 新增文件信息
 * @param: fileInfo
 * @return: void
 */
    void addFileInfo(Storage fileInfo);

    /**
     * @description: 根据uuid查询文件名称
     * @param: uuid
     * @return: String
     */
    @Select(("select name from market_storage where `key` = #{uuid} "))
    String getNameByUUID(String uuid);

    Page<Storage> pageQueryInfo(StoragePageDTO pageDTO);


    @Delete(("delete from market_storage where id = #{id} "))
    void deleteById(Integer id);

    void updateById(Storage storage);
}